using System;
using System.Windows.Forms;

using FreeFlow.Administration;

namespace FreeFlowAdministrator
{
	/// <summary>
	/// Summary description for ServerSettingAdaptor.
	/// </summary>
	public class ServerSettingsAdaptor : Adaptor, IRefreshable
	{
    private Server server;
		public ServerSettingsAdaptor(Server server) : base()
		{
      this.server = server;
		}

    public override string Text
    {
      get
      {
        return "Engine Settings (Database)";
      }
    }

    public override Control GetRenderer()
    {
      ServerSettingsControl control = new ServerSettingsControl();
      control.LoadServerSettings(server);
      return control;
    }

    public override int ImageIndex
    {
      get
      {
        return 23;
      }
    }

    public override object Object
    {
      get
      {
        return server;
      }
    }

    #region IRefreshable Members

    public void Refresh()
    {
      server.Refresh();
    }

    #endregion
  }
}
